package com.chat.transmission.config;

import com.chat.transmission.netty.server.TransferDataNettyServer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

/**
 * @author wei kunJie
 * @date 2024/4/3 15:49:15
 */
@Configuration
public class NettyConfig implements CommandLineRunner {
    @Value("${netty.port}")
    private int nettyPort;
    @Override
    public void run(String... args) throws Exception {
        //运行Netty服务
        new TransferDataNettyServer().init(nettyPort);
    }
}
